package com.example.demo.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.entity.Dictionary;
import com.example.demo.entity.OperLog;
import com.example.demo.entity.dto.PageDto;
import com.example.demo.entity.vo.PageVo;
import com.example.demo.service.LogService;
import com.example.demo.mapper.LogMapper;
import com.example.demo.util.QueryWraperUtil;
import org.springframework.stereotype.Service;

/**
* @author admin
* @description 针对表【log(操作日志记录)】的数据库操作Service实现
* @createDate 2024-01-18 16:05:27
*/
@Service
public class LogServiceImpl extends ServiceImpl<LogMapper, OperLog> implements LogService{

    @Override
    public PageVo<OperLog> getPage(PageDto<OperLog> pageDto) {
        IPage<OperLog> iPage=baseMapper.selectPage(new Page<>(pageDto.getCurrent(),pageDto.getSize()), QueryWraperUtil.getQueryWrap(pageDto.getCdt()));
        return new PageVo<>(iPage.getRecords(),iPage.getCurrent(),iPage.getSize(),iPage.getTotal());
    }
}




